local extension = Package:new("pegasus")
extension.extensionName = "pegasus"

extension:loadSkillSkelsByPath("./packages/pegasus/pkg/pegasus/skills")

local generals = {}

table.insert(generals, {
  name = "pegasus__liuye",
  kingdom = "wei",
  hp = 3,
  skills = {
    "pegasus__polu",
    "pegasus__liaoshi",
  },
  cn_name = "刘晔",
  reputation = "佐世之才",
  designer = "yyuaN",
})

table.insert(generals, {
  name = "pegasus__wenyang",
  kingdom = "qun",
  hp = 5,
  skills = {
    "pegasus__dianpei",
    "pegasus__beimang",
  },
  cn_name = "文鸯",
  reputation = "孤命侵离",
  designer = "一般路过の祝商",
})

table.insert(generals, {
  name = "pegasus__zhangzhi",
  kingdom = "qun",
  hp = 3,
  skills = {
    "pegasus__dubi",
    "pegasus__shudao",
  },
  related_skills = {
    "pegasus__feibai",
    "pegasus__kumo",
  },
  cn_name = "张芝",
  reputation = "草书之冠",
  designer = "神秘跳跳鱼",
  illustrator = "君桓文化",
})

table.insert(generals, {
  name = "pegasus__godzhangjiao",
  kingdom = "god",
  hp = 3,
  skills = {
    "pegasus__wendao",
    "pegasus__hongfa",
    "pegasus__hanting",
  },
  cn_name = "神张角",
  reputation = "驭道震泽",
  designer = "老酒馆的猫",
})

table.insert(generals, {
  name = "pegasus__simashi",
  kingdom = "jin",
  hp = 4,
  skills = {
    "pegasus__dangyi",
    "pegasus__fushi",
  },
  cn_name = "司马师",
  reputation = "摧坚荡异",
  designer = "忆雨Meiko",
})

extension:loadSkillSkels(require "packages/pegasus/pkg/pegasus/derive/wendao")

for _, spec in ipairs(generals) do
  local general = General:new(extension, spec.name, spec.kingdom, spec.hp)
  general:addSkills(spec.skills)
  if spec.related_skills then
    general:addRelatedSkills(spec.related_skills)
  end

  Fk:loadTranslationTable{
    [spec.name] = spec.cn_name,
    ["#" .. spec.name] = spec.reputation or "",
    ["designer:" .. spec.name] = spec.designer or "",
    ["illustrator:" .. spec.name] = spec.illustrator or "",
  }
end

return extension